import 'package:get/get.dart';
import 'package:oli/bean/RecordBean.dart';
import 'state.dart';

class HomeLogic extends GetxController {
  final HomeState state = HomeState();

  @override
  void onInit() {
    super.onInit();
    state.records.addAll([
      RecordBean(
        date: '03/07',
        mileage: 123.252,
        fuelConsumption: 7.76,
        cost: 296.00,
      ),
      RecordBean(
        date: '02/24',
        mileage: 122.875,
        fuelConsumption: 7.76,
        cost: 305.00,
      ),
      // 可以继续添加更多示例记录
    ]);
  }
}
